home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / windows1 / ew100.zip / FILES1.LZH / EWAPIIMP.PAS < prev    next >
Pascal/Delphi Source File  |  1992-11-29  |  12KB  |  235 lines

  1. {************************************************}
  2. {                                                }
  3. { E! for Windows                                 }
  4. { (c) - Patrick Philippot - 1991                 }
  5. { EWAPI DLL import unit                          }
  6. {                                                }
  7. {************************************************}
  8. {$IFDEF DEBUG}
  9. {$A-,G+,B-,D+,F+,I-,N-,R+,S-,V-,L+}
  10. {$ELSE}
  11. {$A-,G+,B-,D-,F+,I-,N-,R-,S-,V-,L-}
  12. {$ENDIF}
  13.  
  14. unit EWAPIImp;
  15.  
  16. INTERFACE
  17.  
  18. uses WinTypes, EWTypes;
  19.  
  20. {$I ewuser.inc}
  21.  
  22. {///////////////////////////// EW Primer access ///////////////////////////}
  23.  
  24. function EWAddTab(col : integer; fAdd : word) : integer;
  25. function EWAlternateHelp(col, row : integer) : integer;
  26. function EWBeginLine(fSkipToPrev : word) : integer;
  27. function EWBlockShift : integer;
  28. function EWBlockSort(fAscend : word) : integer;
  29. function EWCase(fUpper : word) : integer;
  30. function EWCheckBrace(col, row : integer) : integer;
  31. function EWClearLine(row : integer) : integer;
  32. function EWExecCompileCommand(commandindex : word) : integer;
  33. function EWDeleteChar : integer;
  34. function EWDeleteCurLine : integer;
  35. function EWDeleteEOL : integer;
  36. function EWDeleteLeft(fDeleteCurrent : word) : integer;
  37. function EWDeleteLines(start, num : integer) : integer;
  38. function EWDeleteSelection  : integer;
  39. function EWDeleteWord : integer;
  40. function EWEndLine(fSkipToNext, fStrip : word) : integer;
  41. function EWFillBlock(ch : char) : integer;
  42. function EWGetFile(Name : PChar; row : integer) : integer;
  43. function EWGotoBookmark(index : word) : integer;
  44. function EWGotoNextParagraph : integer;
  45. function EWGotoNextTab : integer;
  46. function EWGotoPrevTab : integer;
  47. function EWGotoPrevParagraph : integer;
  48. function EWGotoCompileError(fNext : word) : integer;
  49. function EWGotoLine(row : integer) : integer;
  50. function EWGotoXY(col, row : integer) : integer;
  51. function EWGotoSelection(fBegin : word) : integer;
  52. function EWInsertBrace(col, row : integer) : integer;
  53. function EWInsertLines(start, num : integer) : integer;
  54. function EWInsertMacroText(col, row : integer; macrotype : word) : integer;
  55. function EWJoinLine(row : integer) : integer;
  56. function EWLoadUserFile(col, row : integer) : integer;
  57. function EWNextCol : integer;
  58. function EWNextLine : integer;
  59. function EWNextWord(fNext : word) : integer;
  60. function EWTopOfPage(fTop : word) : integer;
  61. function EWHorzPageScroll(fLeft : word) : integer;
  62. function EWVerPageScroll(fUp : word) : integer;
  63. function EWPrevCol : integer;
  64. function EWPrevLine : integer;
  65. function EWPaste(fInsert : word) : integer;
  66. function EWReflow(row : integer) : integer;
  67. function EWRefresh(fAsk : word) : integer;
  68. function EWRemoveBookmark(index : word) : integer;
  69. function EWSaveFile(Name : PChar) : integer;
  70. function EWSelectAll : integer;
  71. function EWSetBookmark(col, row : integer) : integer;
  72. function EWSetClipboard(fAppend : word) : integer;
  73. function EWPositionCurLine(position : word) : integer;
  74. function EWShiftTextRight(col, row, count : integer) : integer;
  75. function EWSplitLine(col, row : integer) : integer;
  76. function EWStepScroll(dX, dY : integer) : integer;
  77. function EWSumBlock : integer;
  78. function EWStripFlow : integer;
  79. function EWTopOfText(fTop : word) : integer;
  80. function EWTextToCurSor : integer;
  81. function EWToggleInsert : integer;
  82. function EWUpcaseFirst(col, row : integer) : integer;
  83. function EWWriteBlock(startrow, endrow, startcol, endcol : integer;
  84.                       Name      : PChar;
  85.                       mode,
  86.                       fBlock,
  87.                       fCompress : word) : integer;
  88.  
  89. {//////////////////////// Service Routines ////////////////////////////////}
  90.  
  91. function  EWAddMenuEntry(Command, Title : PChar; CommandId : word; AssignMode : word) : longint;
  92. function  EWBeginSelection(SelType : word; col, row : integer) : integer;
  93. function  EWCallUserExt(ExtName : PChar) : integer;
  94. function  EWEditFile(Name : PChar) : longint;
  95. function  EWEndSelection : integer;
  96. procedure EWEnumClones(EditorId : longint; CloneEnumProc : TEnumClonesProc);
  97. procedure EWEnumEditors(EdEnumProc : TEnumEditorsProc);
  98. function  EWFind(MatchLen : PWord) : longint;
  99. function  EWFindRegular(src, dest : PChar; MatchLen : PWord) : word;
  100. function  EWGetCaretPos : longint;
  101. function  EWGetCloneNum : word;
  102. function  EWGetCurWord : longint;
  103. function  EWGetCurrentEditor : longint;
  104. function  EWGetFileName(EditorId : longint) : PChar;
  105. function  EWGetGlobalFlag(FlagId : word) : integer;
  106. function  EWGetInsertState : word;
  107. function  EWGetLineAt(index : integer) : PChar;
  108. function  EWGetLineCount : integer;
  109. function  EWGetLocalFlag(FlagId : word) : integer;
  110. function  EWGetSearchFlag(FlagId : word) : integer;
  111. procedure EWGetSelection(Selection : PSelStruct);
  112. function  EWGetTextPos : longint;
  113. function  EWGetVersion : word;
  114. function  EWGetWindowHandle : word;
  115. function  EWIsRegistered :word;
  116. procedure EWRemoveHook(hFlag : word; HookAddress : pointer);
  117. function  EWRemoveMenuEntry(Id : longint) : longint;
  118. function  EWRepeatFind(MatchLen : PWord) : longint;
  119. procedure EWSetCCHandle(H : HWnd);
  120. function  EWSetCurrentEditor(EditorId : longint) : longint;
  121. procedure EWSetEditorId(EditorId : longint);
  122. procedure EWSetFindPattern(pattern : PChar);
  123. function  EWSetGlobalFlag(FlagId, value : word) : integer;
  124. procedure EWSetHook(hFlag : word; HookAddress : pointer);
  125. function  EWSetLineAt(P : PChar; index : integer) : integer;
  126. function  EWSetLocalFlag(FlagId, value : word) : integer;
  127. function  EWSetSearchFlag(FlagId, value : word) : integer;
  128. procedure EWSetWindowHandle(H : HWnd);
  129. function  EWStopSelection(col, row : integer) : integer;
  130. function  EWUpdateSelection(col, row : integer) : integer;
  131. procedure EWWriteMessage(message : PChar);
  132.  
  133. IMPLEMENTATION
  134.  
  135. function EWAddTab;                     external 'ewapi' index  1;
  136. function EWBeginLine;                  external 'ewapi' index  2;
  137. function EWBlockShift;                 external 'ewapi' index  3;
  138. function EWBlockSort;                  external 'ewapi' index  4;
  139. function EWCase;                       external 'ewapi' index  5;
  140. function EWCheckBrace;                 external 'ewapi' index  6;
  141. function EWClearLine;                  external 'ewapi' index  7;
  142. function EWExecCompileCommand;         external 'ewapi' index  8;
  143. function EWDeleteChar;                 external 'ewapi' index  9;
  144. function EWDeleteCurLine;              external 'ewapi' index 10;
  145. function EWDeleteEOL;                  external 'ewapi' index 11;
  146. function EWDeleteLeft;                 external 'ewapi' index 12;
  147. function EWDeleteLines;                external 'ewapi' index 13;
  148. function EWDeleteSelection;            external 'ewapi' index 14;
  149. function EWDeleteWord;                 external 'ewapi' index 15;
  150. function EWEndLine;                    external 'ewapi' index 16;
  151. function EWFillBlock;                  external 'ewapi' index 17;
  152. function EWGetFile;                    external 'ewapi' index 18;
  153. function EWGotoBookmark;               external 'ewapi' index 19;
  154. function EWGotoNextParagraph;          external 'ewapi' index 20;
  155. function EWGotoNextTab;                external 'ewapi' index 21;
  156. function EWGotoPrevTab;                external 'ewapi' index 22;
  157. function EWGotoPrevParagraph;          external 'ewapi' index 23;
  158. function EWGotoCompileError;           external 'ewapi' index 24;
  159. function EWGotoLine;                   external 'ewapi' index 25;
  160. function EWGotoXY;                     external 'ewapi' index 26;
  161. function EWGotoSelection;              external 'ewapi' index 27;
  162. function EWInsertBrace;                external 'ewapi' index 28;
  163. function EWInsertLines;                external 'ewapi' index 29;
  164. function EWInsertMacroText;            external 'ewapi' index 30;
  165. function EWJoinLine;                   external 'ewapi' index 31;
  166. function EWLoadUserFile;               external 'ewapi' index 32;
  167. function EWNextCol;                    external 'ewapi' index 33;
  168. function EWNextLine;                   external 'ewapi' index 34;
  169. function EWNextWord;                   external 'ewapi' index 35;
  170. function EWTopOfPage;                  external 'ewapi' index 36;
  171. function EWHorzPageScroll;             external 'ewapi' index 37;
  172. function EWVerPageScroll;              external 'ewapi' index 38;
  173. function EWPrevCol;                    external 'ewapi' index 39;
  174. function EWPrevLine;                   external 'ewapi' index 40;
  175. function EWPaste;                      external 'ewapi' index 41;
  176. function EWReflow;                     external 'ewapi' index 42;
  177. function EWRefresh;                    external 'ewapi' index 43;
  178. function EWRemoveBookmark;             external 'ewapi' index 44;
  179. function EWSaveFile;                   external 'ewapi' index 45;
  180. function EWSelectAll;                  external 'ewapi' index 46;
  181. function EWSetBookmark;                external 'ewapi' index 47;
  182. function EWSetClipboard;               external 'ewapi' index 48;
  183. function EWPositionCurLine;            external 'ewapi' index 49;
  184. function EWShiftTextRight;             external 'ewapi' index 50;
  185. function EWSplitLine;                  external 'ewapi' index 51;
  186. function EWStepScroll;                 external 'ewapi' index 52;
  187. function EWSumBlock;                   external 'ewapi' index 53;
  188. function EWStripFlow;                  external 'ewapi' index 54;
  189. function EWTopOfText;                  external 'ewapi' index 55;
  190. function EWTextToCurSor;               external 'ewapi' index 56;
  191. function EWToggleInsert;               external 'ewapi' index 57;
  192. function EWUpcaseFirst;                external 'ewapi' index 58;
  193. function EWWriteBlock;                 external 'ewapi' index 59;
  194. function EWAlternateHelp;              external 'ewapi' index 60;
  195. {///////////////////////////////////////////////////////////////}
  196. function  EWAddMenuEntry;              external 'ewapi' index 61;
  197. function  EWBeginSelection;            external 'ewapi' index 62;
  198. function  EWCallUserExt;               external 'ewapi' index 63;
  199. function  EWEditFile;                  external 'ewapi' index 64;
  200. function  EWEndSelection;              external 'ewapi' index 65;
  201. procedure EWEnumClones;                external 'ewapi' index 66;
  202. procedure EWEnumEditors;               external 'ewapi' index 67;
  203. function  EWFind;                      external 'ewapi' index 68;
  204. function  EWFindRegular;               external 'ewapi' index 69;
  205. function  EWGetCaretPos;               external 'ewapi' index 70;
  206. function  EWGetCloneNum;               external 'ewapi' index 71;
  207. function  EWGetCurWord;                external 'ewapi' index 72;
  208. function  EWGetCurrentEditor;          external 'ewapi' index 73;
  209. function  EWGetFileName;               external 'ewapi' index 74;
  210. function  EWGetGlobalFlag;             external 'ewapi' index 75;
  211. function  EWGetInsertState;            external 'ewapi' index 76;
  212. function  EWGetLineAt;                 external 'ewapi' index 77;
  213. function  EWGetLineCount;              external 'ewapi' index 78;
  214. function  EWGetLocalFlag;              external 'ewapi' index 79;
  215. function  EWGetSearchFlag;             external 'ewapi' index 80;
  216. procedure EWGetSelection;              external 'ewapi' index 81;
  217. function  EWGetTextPos;                external 'ewapi' index 82;
  218. function  EWGetVersion;                external 'ewapi' index 83;
  219. function  EWGetWindowHandle;           external 'ewapi' index 84;
  220. procedure EWRemoveHook;                external 'ewapi' index 86;
  221. function  EWRemoveMenuEntry;           external 'ewapi' index 87;
  222. function  EWRepeatFind;                external 'ewapi' index 88;
  223. function  EWSetCurrentEditor;          external 'ewapi' index 90;
  224. procedure EWSetFindPattern;            external 'ewapi' index 92;
  225. function  EWSetGlobalFlag;             external 'ewapi' index 93;
  226. procedure EWSetHook;                   external 'ewapi' index 94;
  227. function  EWSetLineAt;                 external 'ewapi' index 95;
  228. function  EWSetLocalFlag;              external 'ewapi' index 96;
  229. function  EWSetSearchFlag;             external 'ewapi' index 97;
  230. function  EWStopSelection;             external 'ewapi' index 99;
  231. function  EWUpdateSelection;           external 'ewapi' index 100;
  232. procedure EWWriteMessage;              external 'ewapi' index 101;
  233.  
  234. end.
  235.